﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Metadata.Edm;
using System.Data.Objects;
using System.Data;

namespace org.ids_adi.iring.adapter.dataLayer.Model
{
  public interface IEntities
  {
    MetadataWorkspace MetadataWorkspace { get; }

    int SaveChanges();

    int SaveChanges(bool acceptChangesDuringSave);

    void DeleteObject(object entity);

    ObjectQuery<T> CreateQuery<T>(string queryString, params ObjectParameter[] parameters);

    EntityKey CreateEntityKey(string entitySetName, object entity);

    object GetObjectByKey(EntityKey key);

    void AddObject(string entitySetName, object entity);

    void ApplyPropertyChanges(string entitySetName, object changed);
  }
}
